<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.springframework.org/schema/jdbc">

<head>
    <meta charset="utf-8">
    <title>小区房屋及人员信息管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <script type="text/javascript" src="assets/js/jquery.js"></script>

    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="assets/css/loader-style.css">
    <link rel="stylesheet" href="assets/css/bootstrap.css">


    <link href="assets/js/footable/css/footable.core.css?v=2-0-1" rel="stylesheet" type="text/css">
    <link href="assets/js/footable/css/footable.standalone.css" rel="stylesheet" type="text/css">
    <link href="assets/js/footable/css/footable-demos.css" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="assets/js/dataTable/lib/jquery.dataTables/css/DT_bootstrap.css">
    <link rel="stylesheet" href="assets/js/dataTable/css/datatables.responsive.css">

    <script type="text/javascript"   th:src="@{/js/Utils.js}"></script>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    <!-- Fav and touch icons -->
    <link rel="shortcut icon" href="assets/ico/minus.png">
</head>

<body><div id="awwwards" class="right black"><a href="http://www.awwwards.com/best-websites/apricot-navigation-admin-dashboard-template" target="_blank">best websites of the world</a></div>
    <!-- Preloader -->
    <div id="preloader">
        <div id="status">&nbsp;</div>
    </div>
    <!-- TOP NAVBAR -->
    <nav role="navigation" class="navbar navbar-static-top">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle" type="button">
                    <span class="entypo-menu"></span>
                </button>
                <button class="navbar-toggle toggle-menu-mobile toggle-left" type="button">
                    <span class="entypo-list-add"></span>
                </button>




                <div id="logo-mobile" class="visible-xs">
                   <h1>小区房屋及人员信息管理系统</h1>
                </div>

            </div>



            <!--收集导航链接、表单和其他内容以进行切换-->
            <div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">

                    <li class="dropdown">
                        <!--下拉菜单data-toggle="dropdown"，标记有23条信息-->
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i style="font-size:20px;" class="icon-conversation"></i><div class="noft-red">23</div></a>

                        <ul style="margin: 11px 0 0 9px;" role="menu" class="dropdown-menu dropdown-wrap">
                            <li>
                                <a href="#">
                                    <img alt="" class="img-msg img-circle" src="http://api.randomuser.me/portraits/thumb/men/1.jpg">陈曼仁<b>刚刚</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <img alt="" class="img-msg img-circle" src="http://api.randomuser.me/portraits/thumb/women/1.jpg">陈丽平<b>3分钟之前</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <img alt="" class="img-msg img-circle" src="http://api.randomuser.me/portraits/thumb/men/10.jpg">钟惠珍<b>5分钟之前</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <img alt="" class="img-msg img-circle" src="http://api.randomuser.me/portraits/thumb/men/3.jpg">徐洁怡  <b>1天之前</b>
                                </a>
                            </li>

                            <!--divider直线-->
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <img alt="" class="img-msg img-circle" src="http://api.randomuser.me/portraits/thumb/men/2.jpg">程可霓<b>3个月之前</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <div>查看所有信息</div>
                            </li>
                        </ul>
                    </li>
                    <li>

                        <a data-toggle="dropdown" class="dropdown-toggle" href="#"><i style="font-size:19px;" class="icon-warning tooltitle"></i><div class="noft-green">3</div></a>
                        <ul style="margin: 12px 0 0 0;" role="menu" class="dropdown-menu dropdown-wrap">
                            <li>
                                <a href="#">
                                    <span style="background:#DF2135" class="noft-icon maki-bus"></span>来自社区的邮件 <b>刚刚</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <span style="background:#AB6DB0" class="noft-icon maki-airport"></span>最新消息2 <b>早上9:00</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="#">
                                    <span style="background:#FFA200" class="noft-icon maki-bicycle"></span>最新消息1<b>早上6:00</b>
                                </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <div>查看所有信息</div>
                            </li>
                        </ul>
                    </li>
                    <li><a href="#"><i data-toggle="tooltip" data-placement="bottom" title="帮助" style="font-size:20px;" class="icon-help tooltitle"></i></a>
                    </li>

                </ul>
                <div id="nt-title-container" class="navbar-left running-text visible-lg">
                    <ul class="date-top">
                        <li class="entypo-calendar" style="margin-right:5px"></li>
                        <li id="Date"></li>
                    </ul>

                    <ul id="digital-clock" class="digital">
                        <!--显示当前日期-->
                        <li class="entypo-clock" style="margin-right:5px"></li>
                        <li class="hour"></li>
                        <li>:</li>
                        <!--显示当前时间-->
                        <li class="min"></li>
                        <li>:</li>
                        <li class="sec"></li>
                        <li class="meridiem"></li>
                    </ul>

                    <ul id="nt-title">
                        <li><i class="wi-day-lightning"></i>&#160;&#160;Berlin&#160;
                            <b>85</b><i class="wi-fahrenheit"></i>&#160;; 15km/h
                        </li>
                        <li><i class="wi-day-lightning"></i>&#160;&#160;Yogyakarta&#160;
                            <b>85</b><i class="wi-fahrenheit"></i>&#160;; Tonight- 72 °F (22.2 °C)
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;Sttugart&#160;
                            <b>85</b><i class="wi-fahrenheit"></i>&#160;; 15km/h
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;Muchen&#160;
                            <b>85</b><i class="wi-fahrenheit"></i>&#160;; 15km/h
                        </li>

                        <li><i class="wi-day-lightning"></i>&#160;&#160;Frankurt&#160;
                            <b>85</b><i class="wi-fahrenheit"></i>&#160;; 15km/h
                        </li>

                    </ul>
                </div>

                <ul style="margin-right:0;" class="nav navbar-nav navbar-right">
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <img alt="" class="admin-pic img-circle" src="http://api.randomuser.me/portraits/thumb/women/8.jpg">哈喽, 张裕嘉<b class="caret"></b>
                        </a>
                        <ul style="margin-top:14px;" role="menu" class="dropdown-setting dropdown-menu">
                            <li>
                                <a href="#">
                                    <span class="entypo-user"></span>&#160;&#160;个人信息</a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="entypo-vcard"></span>&#160;&#160;账号密码修改</a>
                            </li>
                            <li>
                                <a href="#">
                                    <span class="entypo-lifebuoy"></span>&#160;&#160;帮助</a>
                            </li>

                        </ul>
                    </li>
                    <li>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="icon-gear"></span>&#160;&#160;设置</a>
                        <ul role="menu" class="dropdown-setting dropdown-menu">

                            <li class="theme-bg">
                                <div id="button-bg"></div>
                                <div id="button-bg2"></div>
                                <div id="button-bg3"></div>
                                <div id="button-bg5"></div>
                                <div id="button-bg6"></div>
                                <div id="button-bg7"></div>
                                <div id="button-bg8"></div>
                                <div id="button-bg9"></div>
                                <div id="button-bg10"></div>
                                <div id="button-bg11"></div>
                                <div id="button-bg12"></div>
                                <div id="button-bg13"></div>
                            </li>
                        </ul>
                    </li>
                </ul>

            </div>
            <!-- 导航栏折叠 -->
        </div>
        <!-- 容器流体-->
    </nav>

<!--顶部导航结束 -->

<!-- 侧边菜单 -->
<div id="skin-select">
    <div id="logo">
        <h1>管理员信息</h1>
    </div>

    <a id="toggle">
        <span class="entypo-menu"></span>
    </a>

    <div class="skin-part">
        <div id="tree-wrap">
            <div class="side-bar">
                <ul class="topnav menu-left-nest">
                    <li>
                        <a href="#" style="border-left:0px solid!important;" class="title-menu-left">

                            <span class="admin-info"></span>
                            <i data-toggle="tooltip" class="entypo-cog pull-right config-wrap"></i>

                        </a>
                    </li>

                    <li>
                        <a class="tooltip-tip ajax-load" href="#" title="管理员系统">
                            <i class="icon-document-edit"></i>
                            <span>个人信息</span>

                        </a>
                        <ul>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="info-view.html" title="查看个人信息"><i class="entypo-doc-text"></i><span>查看个人信息</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="info-modify.html" title="修改个人信息"><i class="entypo-newspaper"></i><span>修改个人信息</span></a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a class="tooltip-tip ajax-load" href="info-admin.html" title="Social">
                            <i class="icon-feed"></i>
                            <span>所有管理员信息</span>

                        </a>
                    </li>
                    <li>
                        <a class="tooltip-tip ajax-load" href="login.html" title="Media">
                            <i class="icon-camera"></i>
                            <span>退出</span>

                        </a>
                    </li>
                </ul>

                <ul class="topnav menu-left-nest">
                    <li>
                        <a href="#" style="border-left:0px solid!important;" class="title-menu-left">

                            <span class="user-manage"></span>
                            <i data-toggle="tooltip" class="entypo-cog pull-right config-wrap"></i>

                        </a>
                    </li>

                    <li>
                        <a class="tooltip-tip ajax-load" href="table-user.html" title="Dashboard">
                            <i class="icon-window"></i>
                            <span>住户表</span>

                        </a>
                    </li>
                    <li>
                        <a class="tooltip-tip ajax-load" href="table-complain.html" title="Mail">
                            <i class="icon-mail"></i>
                            <span>投诉表</span>
                        </a>
                    </li>

                    <li>
                        <a class="tooltip-tip ajax-load" href="table-repair.html" title="Icons">
                            <i class="icon-preview"></i>
                            <span>维修表</span>
                        </a>
                    </li>

                    <li>
                        <a class="tooltip-tip" href="#" title="Extra Pages">
                            <i class="icon-document-new"></i>
                            <span>公共停车位</span>
                        </a>
                        <ul>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="parks-arrange.html" title="Blank Page"><i class="icon-media-record"></i><span>停车位安排表</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="parks-flow.html" title="Profile Page"><i class="icon-user"></i><span>流动车位表</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="parks-apply.html" title="Invoice"><i class="entypo-newspaper"></i><span>申请停车位</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="parks-info.html" title="Pricing Table"><i class="fontawesome-money"></i><span>停车通报信息</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="parks-set.html" title="Time Line"><i class="entypo-clock"></i><span>停车位管理规定</span></a>
                            </li>

                        </ul>
                    </li>

                    <li>
                        <a class="tooltip-tip " href="table-fee.html" title="login">
                            <i class="icon-download"></i>
                            <span>费用表</span>
                        </a>
                    </li>

                </ul>

                <ul id="menu-showhide" class="topnav menu-left-nest">
                    <li>
                        <a href="#" style="border-left:0px solid!important;" class="title-menu-left">

                            <span class="component"></span>
                            <i data-toggle="tooltip" class="entypo-cog pull-right config-wrap"></i>

                        </a>
                    </li>


                    <li>
                        <a class="tooltip-tip" href="#" title="UI Element">
                            <i class="icon-monitor"></i>
                            <span>住户处理</span>
                        </a>
                        <ul>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="user-add.html" title="Element"><i class="icon-attachment"></i><span>添加住户</span></a>
                            </li>
                            <li><a class="tooltip-tip2 ajax-load" href="user-change.html" title="Button"><i class="icon-view-list-large"></i><span>更改住户</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="user-delete.html" title="Tab & Accordion"><i class="icon-folder"></i><span>删除住户</span></a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a class="tooltip-tip" href="#" title="Form">
                            <i class="icon-document"></i>
                            <span>房屋处理</span>
                        </a>
                        <ul>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="room-info.html" title="Form Elements"><i class="icon-document-edit"></i><span>房屋信息</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="room-ban.html" title="Andvance Form"><i class="icon-map"></i><span>禁售房屋添加</span></a>
                            </li>
                            <li>
                                <a class="tooltip-tip2 ajax-load" href="room-sale.html" title="Text Editor"><i class="icon-code"></i><span>销售房屋添加</span></a>
                            </li>
                        </ul>
                    </li>


                    <li>
                        <a class="tooltip-tip ajax-load" href="notice.html" title="Map">
                            <i class="icon-location"></i>
                            <span>发布公告</span>

                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- 侧菜单结束 -->


    <!--纸包装-->
    <div class="wrap-fluid">
        <div class="container-fluid paper-wrap bevel tlbr">
            <!-- 内容 -->
            <!--主题 -->
            <div class="row">
                <div id="paper-top">
                    <div class="col-sm-3">
                        <h2 class="tittle-content-header">
                            <i class="icon-feed"></i> 
                            <span>管理员好!
                            </span>
                        </h2>

                    </div>

                    <div class="col-sm-7">
                        <div class="devider-vertical visible-lg"></div>
                        <div class="tittle-middle-header">

                            <div class="alert">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                <span class="tittle-alert entypo-info-circled"></span>
                                欢迎回来,&nbsp;
                                <strong>哈喽，张裕嘉!</strong>&nbsp;你上一次登录的时间是昨天下午16:54
                            </div>


                        </div>

                    </div>
                    <div class="col-sm-2">
                        <div class="devider-vertical visible-lg"></div>
                    </div>
                </div>
            </div>
            <!--主题结束 -->

            <div class="content-wrap">
                <div class="row">

                    <div class="col-sm-12">

                        <div class="nest" id="tableStaticClose">
                            <div class="title-alt">
                                <h6>
                                    管理员信息</h6>
                                <div class="titleClose">
                                    <a class="gone" href="#tableStaticClose">
                                        <span class="entypo-cancel"></span>
                                    </a>
                                </div>
                                <div class="titleToggle">
                                    <a class="nav-toggle-alt" href="#tableStatic">
                                        <span class="entypo-up-open"></span>
                                    </a>
                                </div>

                            </div>

                            <div class="body-nest" id="tableStatic">

                                <section id="flip-scroll">

                                    <table class="table table-bordered table-striped cf" id="AllAdminInfo">
                                        <thead class="cf">
                                        <tr>
                                            <th>工号</th>
                                            <th>姓名</th>
                                            <th>密码</th>
                                            <th>进入时间</th>
                                            <th>邮箱</th>
                                            <th>联系方式</th>
                                            <th>爱好</th>
                                            <th>能力</th>
                                            <th>备注</th>
                                        </tr>
                                        </thead>

                                        <!--从数据库中获取数据-->




                                        <tfoot>
                                        <tr>
                                            <td colspan="13">
                                                <div class="pagination pagination-centered"></div>
                                            </td>
                                        </tr>
                                        </tfoot>
                                    </table>
                                    <button class="btn btn btn-primary pull-right" type="button" id="refresh-button" onclick="loadwiewpage();">
                                       刷新数据
                                    </button>
                                </section>

                            </div>

                        </div>


                    </div>

                </div>
            </div>




            <!-- 内容结束 -->
        </div>
    </div>
    <!--  END OF PAPER WRAP -->

<!-- MAIN EFFECT -->
<script type="text/javascript" src="assets/js/preloader.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.js"></script>
<script type="text/javascript" src="assets/js/app.js"></script>
<script type="text/javascript" src="assets/js/load.js"></script>
<script type="text/javascript" src="assets/js/main.js"></script>

<script src='http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script>

<script type="text/javascript">
    //通过绑定按钮，实现ajax回传的数据放入表格中,查看所有的管理员信息
    function loadData(data)
    {
        //先移除tbody，再更新
//        $("AllAdminInfo").remove();
        removetbody("AllAdminInfo");
        var tbody = document.createElement("tbody"); //新建一个tbody类型的Element节点
        for(var row of data) {


            var tr = document.createElement("tr"); //新建一个tr类型的Element节点
            var rows = document.getElementById("AllAdminInfo");
            var col = rows.rows.length;//获取数据的长度
//            var td = document.createElement("td"); //新建一个td类型的Element节点
//            var objche = document.createElement("input");
//            objche.type = "checkbox";
//            objche.id = row.aid;
//
//            td.appendChild(objche);//把新创建的input放进td中
//            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.admin_id; // 链接。。。。
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.admin_name;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.admin_password;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = formatDateTime(row.joinTime);
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.nickName;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.mail;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.phone;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.hobby;
            tr.appendChild(td);//将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.skill;
            tr.appendChild(td); //将节点td加入tr中
            var td = document.createElement("td"); //新建一个td类型的Element节点
            td.innerHTML = row.admin_remark;
            tr.appendChild(td); //将节点td加入tr中

            tbody.appendChild(tr); //将节点tr加入tbody中

        }
        var parNode = document.getElementById("AllAdminInfo");
        parNode.appendChild(tbody);


    }

</script>
<script type="text/javascript">

//    加载表格

function loadwiewpage() {
    var xhr = new XMLHttpRequest();
    var datas = JSON.stringify();
    xhr.onreadystatechange = function()
    {
        if(xhr.readyState == 4 && xhr.status == 200)
        {
            var data = JSON.parse(xhr.responseText);
            loadData((data));

        }
    };
    xhr.open('POST',"/Admin/selectAdmin",true);
    xhr.setRequestHeader("Content-type","application/json;charset=UTF-8");
    xhr.send(datas);
    }
//    loadwiewpage();

</script>


</body>

</html>
